<?php
class Myclass{
		private $config = [
			'host'=>'localhost',
			'user'=>'root',
			'pwd'=>'root',
			'dbname' =>'thinksite'
		];
	public function __set($var,$val){
		if(isset($this->config['$var'])){
			$this->config[$var] =$val;
		}
	}
	//
}
//动态配置
$obj = new Myclass;
$obj->dbname ="thinksiteshop";
var_dump($obj);*/